ostree_repo_checkout_tree_at: New API for checkouts
authorColin Walters <walters@verbum.org>
Mon, 6 Apr 2015 22:29:01 +0000 (18:29 -0400)
committerColin Walters <walters@verbum.org>
Tue, 7 Apr 2015 19:12:16 +0000 (15:12 -0400)
commitc2aabcac3b69aa64ac6eb9c9b09c237e24634a65
treee01c1c29aa972e963431a3c784a6b5be33750507
parent115e05746beac7b52f8515e34b339d65e105b5e0
ostree_repo_checkout_tree_at: New API for checkouts

rpm-ostree currently uses ostree_repo_checkout_tree(), which as a side
effect will use the uncompressed objects cache by default.  This is
rather annoying if you're using rpm-ostree on a server-side
repository, because if you then rsync the repo, you'll be syncing out
the uncompressed objects unless you exclude them.

We added the ability to disable the uncompressed cache in the
repository config to fix this, but it's better to allow application
control over this.  The uncompressed cache will in some future version
become opt in as well.

This new API further:
 - Drops the `GFile` usage in favor of `openat` APIs
 - Improves ergonomics by avoiding callers having to query the source
   `GFileInfo` (and carry around a copy of `OSTREE_GIO_FAST_QUERYINFO`)
 - Has a more extensible options structure

Per the comment, I rather crudely have the `ostree checkout` builtin
call both APIs to ensure some testing coverage.

However, I'd like to in the future have easier-to-set-up testing code
that calls `libtest.sh` to set up dummy data.
doc/ostree-sections.txt
src/libostree/ostree-repo-checkout.c
src/libostree/ostree-repo.h
src/ostree/ot-builtin-checkout.c
tests/basic-test.sh